// 获取 sysIps 列表
export async function getSysIpsList() {
  const res = await fetch('https://eiots.fftai.com/qa-api/sysIps/list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    }
  })
  if (!res.ok) throw new Error('请求失败')
  return await res.json()
}

// 获取 获取用户
export async function getUserList(ip, code) {
	console.log(ip,code);
	
  const formData = new FormData()
  formData.append('codeKey', code)
  
  const res = await fetch(`http://${ip}/equipment-iot/users/getUserByCodeKeyParam`, {
    method: 'POST',
    body: formData
  })
  if (!res.ok) throw new Error('请求失败')
  return await res.json()
}

